package uz.rt.linac;

import uz.rt.units.Length;

public abstract class LinacComponent implements Comparable<LinacComponent>
{
    protected Length distanceToSource = null;

    public int compareTo(LinacComponent o)
    {
        return distanceToSource.compareTo(o.getDistanceToSource());
    }

    public Length getDistanceToSource()
    {
        return distanceToSource;
    }

    public void setDistanceToSource(Length distanceToSource)
    {
        this.distanceToSource = distanceToSource;
    }
}
